"use strict";

const { Service } = require("egg");
const { ClassLog } = require("../entity/myentity");

class classLogService extends Service {
   /**
   * 获取日志
   * @param {ClassLog} classLog 
   */
  async get(classLog) {
    const { app } = this;
    //console.log(classLog.c_id);
    try {
      let query = await app.mysql.select("class_log", {
         where: classLog,
      });
      return { suc: true, msg: "查询班级日志成功", data: query };
    } catch (error) {
      ctx.logger.error(err);
      return { suc: false, msg: error };
    }
  }
}
module.exports = classLogService;
